import { axios } from '@/utils/request'

const api = {
  speciality: '/system/speciality'
}

/**
 * 返回分页
 * @param {Object} parameter
 */
export function getSpecialityBaseList (parameter) {
  return axios({
    url: api.speciality + '/list',
    method: 'get',
    params: parameter
  })
}

/**
 * 返回列表
 * @param {Object} parameter
 */
export function getSpecialityList (parameter) {
  return axios({
    url: api.speciality + '/jlist',
    method: 'get',
    params: parameter
  })
}

export function saveSpecialityBase (parameter) {
  return axios({
    url: api.speciality + '/save',
    method: 'post',
    data: parameter,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

export function updateSpecialityBase (parameter) {
  return axios({
    url: api.speciality + '/update',
    method: 'post',
    data: parameter,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

export function delSpecialityBase (parameter) {
  return axios({
    url: api.speciality + '/remove',
    method: 'post',
    params: parameter
  })
}

export const specialityBaseExport = api.speciality + '/export'
